package de.tudarmstadt.ukp.muip.fibqdojo.util;

import java.util.List;

import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQSentence;
import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQSentenceToken;
import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQToken;
import de.tudarmstadt.ukp.muip.fibqdojo.visitor.GetSentenceTokenListVisitor;
import de.tudarmstadt.ukp.muip.fibqdojo.visitor.GetTokenListVisitor;

/**
 * A util class which provides pre-defined methods for frequently used
 * operations on sentences and their tokens
 * 
 * @author Tobias Horsmann
 */
public class FIBQUtil {

    public static List<IFIBQSentenceToken> getSentenceToken(IFIBQSentence sentence) {
        GetSentenceTokenListVisitor tokenList = new GetSentenceTokenListVisitor();
        sentence.accept(tokenList);
        return tokenList.getSentenceTokens();
    }

    public static List<IFIBQToken> getToken(IFIBQSentence sentence) {
        GetTokenListVisitor tokenList = new GetTokenListVisitor();
        sentence.accept(tokenList);
        return tokenList.getTokens();
    }

}
